package com.wp.rcm.service.impl;

import com.wp.rcm.mapper.ChanceMapper;
import com.wp.rcm.pojo.Chance;
import com.wp.rcm.service.ChanceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ChanceServiceImpl implements ChanceService {

    @Resource
    private ChanceMapper chanceMapper;

    @Override
    public int count(String custName, String chcDesc)
    {
        return chanceMapper.count(custName,chcDesc);
    }

    @Override
    public List<Chance> findAll(String custName, String chcDesc, Integer offset,Integer pageSize) {
        return chanceMapper.findAll(custName,chcDesc,offset,pageSize);
    }

    @Override
    public int delete(Integer chcId) {
        return chanceMapper.delete(chcId);
    }

    @Override
    public int insert(Chance chance) {
        return chanceMapper.insert(chance);
    }

    @Override
    public Chance findByChcId(Integer chcId) {
        return chanceMapper.findByChcId(chcId);
    }

    @Override
    public int update(Chance chance) {
        return chanceMapper.update(chance);
    }
}
